import request from '@/utils/request';
import { getPageSize } from '@/utils/common';

/**
 * 查询列表
 */
export async function selectSequenceList(params) {
  params.pageSize = params.pageSize || 10;
  return request(`/server/api/mds/mds-code-sequence/selectMdsCodeSequenceList`, {
    method: 'POST',
    body: params,
  });
}

/**
 * 查询详情
 */
export async function selectSequenceDetails(params) {
  return request(`/server/api/mds/mds-code-sequence/viewMdsCodeSequenceDetails`, {
    method: 'POST',
    body: params,
  });
}
//保存操作
export async function saveSequence(params) {
  const { ...body } = params;
  const url = params.id ? 'updateMdsCodeSequence' : 'insertMdsCodeSequence';
  return request(`/server/api/mds/mds-code-sequence/${url}`, {
    method: 'POST',
    body,
  });
}
//删除
export async function deleteSequence(params) {
  const { ...body } = params;
  return request(`/server/api/mds/mds-code-sequence/deleteMdsCodeSequence`, {
    method: 'POST',
    body,
  });
}
